import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '用户账号',
    align: "center",
    dataIndex: 'username'
  },
  {
    title: '用户姓名',
    align: "center",
    sorter: true,
    dataIndex: 'realname'
  },
  {
    title: '用户年龄',
    align: "center",
    sorter: true,
    dataIndex: 'age'
  },
  {
    title: '用户电话',
    align: "center",
    dataIndex: 'phone'
  },
  {
    title: '用户地址',
    align: "center",
    dataIndex: 'location'
  },
  {
    title: '产品号码',
    align: "center",
    sorter: true,
    dataIndex: 'productNumber'
  },
  {
    title: '产品实例ID',
    align: "center",
    sorter: true,
    dataIndex: 'productExampleId'
  },
  {
    title: '合约名称',
    align: "center",
    dataIndex: 'contractName'
  },
  {
    title: '合约结束时间',
    align: "center",
    sorter: true,
    dataIndex: 'contractEndTime'
  },
  {
    title: '主套餐名称',
    align: "center",
    dataIndex: 'mainMealName'
  },
  {
    title: '状态匹配',
    align: "center",
    dataIndex: 'stateMatching'
  },
  {
    title: '网格名称（模糊匹配）',
    align: "center",
    dataIndex: 'griddingName'
  },
  {
    title: '营业区(模糊匹配)',
    align: "center",
    dataIndex: 'businessQuarter'
  },
  {
    title: '是否质差',
    align: "center",
    sorter: true,
    dataIndex: 'sfzc_dictText'
  },
  {
    title: '宽带装机地址',
    align: "center",
    dataIndex: 'kdzjdz'
  },
  {
    title: '宽带下行速率',
    align: "center",
    dataIndex: 'kdxxsl'
  },
  {
    title: '是否E8-C终端',
    align: "center",
    sorter: true,
    dataIndex: 'e8C_dictText'
  },
  {
    title: '近三月账户下平均出账收入(分摊前)1',
    align: "center",
    dataIndex: 'jsgyzhpjczsr'
  },
  {
    title: '是否千兆光猫',
    align: "center",
    sorter: true,
    dataIndex: 'sfqzgm_dictText'
  },
  {
    title: '是否终端硬合约',
    align: "center",
    sorter: true,
    dataIndex: 'sfzdyhy_dictText'
  },
  {
    title: '是否端网不匹配',
    align: "center",
    sorter: true,
    dataIndex: 'sfdwbpp_dictText'
  },
  {
    title: '是否近三个月障碍',
    align: "center",
    sorter: true,
    dataIndex: 'sfjsgyzi_dictText'
  },
  {
    title: '是否中高值',
    align: "center",
    sorter: true,
    dataIndex: 'sfzgz_dictText'
  },
  {
    title: '欠费金额(截止昨日)',
    align: "center",
    sorter: true,
    dataIndex: 'amountInArrear'
  },
  {
    title: '终端速率',
    align: "center",
    sorter: true,
    dataIndex: 'terminalRate'
  },
  {
    title: '省',
    align: "center",
    dataIndex: 'province'
  },
  {
    title: '市',
    align: "center",
    dataIndex: 'city'
  },
  {
    title: '区域',
    align: "center",
    dataIndex: 'area'
  },
  {
    title: '光猫型号',
    align: "center",
    dataIndex: 'model'
  },
  {
    title: '光猫是否匹配',
    align: "center",
    dataIndex: 'gmsfbpp'
  },
  {
    title: '游戏网站名称',
    align: "center",
    dataIndex: 'gameName'
  },
  {
    title: '游戏下行累计流量(M)',
    align: "center",
    dataIndex: 'gameDown'
  },
  {
    title: '游戏上行累计流量(M)',
    align: "center",
    dataIndex: 'gameUp'
  },
  {
    title: '日均时长/游戏总时长(h)',
    align: "center",
    dataIndex: 'gameDaot'
  },
  {
    title: '日均流量/游戏总流量(M)',
    align: "center",
    dataIndex: 'gameRateOfFlow'
  },
  {
    title: '游戏质差次数',
    align: "center",
    dataIndex: 'gameZccs'
  },
  {
    title: '游戏质差时长占比(%)',
    align: "center",
    dataIndex: 'gameProportion'
  },
  {
    title: '游戏上行平均时延(ms)',
    align: "center",
    dataIndex: 'gameUpDefer'
  },
  {
    title: '游戏下行平均时延(ms)',
    align: "center",
    dataIndex: 'gameDownDefer'
  },
  {
    title: '游戏上行平均抖动(ms)',
    align: "center",
    dataIndex: 'gameUpShake'
  },
  {
    title: '游戏下行平均抖动(ms)',
    align: "center",
    dataIndex: 'gameDownShake'
  },
  {
    title: '主播网站名称',
    align: "center",
    dataIndex: 'anchorName'
  },
  {
    title: '主播下行累计流量(M)',
    align: "center",
    dataIndex: 'anchorDown'
  },
  {
    title: '主播上行累计流量(M)',
    align: "center",
    dataIndex: 'anchorUp'
  },
  {
    title: '日均时长/主播总时长(h)',
    align: "center",
    dataIndex: 'anchorDaot'
  },
  {
    title: '日均流量/主播总流量(M)',
    align: "center",
    dataIndex: 'anchorRateOfFlow'
  },
  {
    title: '主播质差次数',
    align: "center",
    dataIndex: 'anchorZccs'
  },
  {
    title: '主播质差时长占比(%)',
    align: "center",
    dataIndex: 'anchorProportion'
  },
  {
    title: '主播上行平均时延(ms)',
    align: "center",
    dataIndex: 'anchorUpDefer'
  },
  {
    title: '主播下行平均时延(ms)',
    align: "center",
    dataIndex: 'anchorDownDefer'
  },
  {
    title: '主播上行平均抖动(ms)',
    align: "center",
    dataIndex: 'anchorUpShake'
  },
  {
    title: '主播下行平均抖动(ms)',
    align: "center",
    dataIndex: 'anchorDownShake'
  },
];

//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: "产品号码",
    field: 'productNumber',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "产品实例ID",
    field: 'productExampleId',
    component: 'Input',
    colProps: {span: 6},
  },
  {
    label: "是否质差",
    field: 'sfzc',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
    colProps: {span: 6},
  },
  {
    label: "是否终端硬合约",
    field: 'sfzdyhy',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
    colProps: {span: 6},
  },
  {
    label: "是否端网不匹配",
    field: 'sfdwbpp',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
    colProps: {span: 6},
  },
  {
    label: "是否近三个月障碍",
    field: 'sfjsgyzi',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
    colProps: {span: 6},
  },
  {
    label: "是否中高值",
    field: 'sfzgz',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
    colProps: {span: 6},
  },
  {
    label: "欠费金额(截止昨日)",
    field: 'amountInArrear',
    component: 'Input',
    colProps: {span: 6},
  },
];

//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '用户账号',
    field: 'username',
    component: 'Input',
  },
  {
    label: '用户姓名',
    field: 'realname',
    component: 'Input',
  },
  {
    label: '用户年龄',
    field: 'age',
    component: 'Input',
  },
  {
    label: '用户电话',
    field: 'phone',
    component: 'Input',
  },
  {
    label: '用户地址',
    field: 'location',
    component: 'Input',
  },
  {
    label: '产品号码',
    field: 'productNumber',
    component: 'Input',
  },
  {
    label: '产品实例ID',
    field: 'productExampleId',
    component: 'Input',
  },
  {
    label: '合约名称',
    field: 'contractName',
    component: 'Input',
  },
  {
    label: '合约结束时间',
    field: 'contractEndTime',
    component: 'Input',
  },
  {
    label: '主套餐名称',
    field: 'mainMealName',
    component: 'InputTextArea',
  },
  {
    label: '状态匹配',
    field: 'stateMatching',
    component: 'Input',
  },
  {
    label: '网格名称（模糊匹配）',
    field: 'griddingName',
    component: 'Input',
  },
  {
    label: '营业区(模糊匹配)',
    field: 'businessQuarter',
    component: 'Input',
  },
  {
    label: '是否质差',
    field: 'sfzc',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '宽带装机地址',
    field: 'kdzjdz',
    component: 'InputTextArea',
  },
  {
    label: '宽带下行速率',
    field: 'kdxxsl',
    component: 'InputNumber',
  },
  {
    label: '是否E8-C终端',
    field: 'e8C',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '近三月账户下平均出账收入(分摊前)1',
    field: 'jsgyzhpjczsr',
    component: 'Input',
  },
  {
    label: '是否千兆光猫',
    field: 'sfqzgm',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '是否终端硬合约',
    field: 'sfzdyhy',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '是否端网不匹配',
    field: 'sfdwbpp',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '是否近三个月障碍',
    field: 'sfjsgyzi',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '是否中高值',
    field: 'sfzgz',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: "yn"
    },
  },
  {
    label: '欠费金额(截止昨日)',
    field: 'amountInArrear',
    component: 'InputNumber',
  },
  {
    label: '终端速率',
    field: 'terminalRate',
    component: 'InputNumber',
  },
  {
    label: '省',
    field: 'province',
    component: 'Input',
  },
  {
    label: '市',
    field: 'city',
    component: 'Input',
  },
  {
    label: '区域',
    field: 'area',
    component: 'Input',
  },
  {
    label: '光猫型号',
    field: 'model',
    component: 'Input',
  },
  {
    label: '光猫是否不匹配',
    field: 'gmsfbpp',
    component: 'Input',
  },
  {
    label: '游戏网站名称',
    field: 'gameName',
    component: 'Input',
  },
  {
    label: '游戏下行累计流量(M)',
    field: 'gameDown',
    component: 'Input',
  },
  {
    label: '游戏上行累计流量(M)',
    field: 'gameUp',
    component: 'Input',
  },
  {
    label: '日均时长/游戏总时长(h)',
    field: 'gameDaot',
    component: 'Input',
  },
  {
    label: '日均流量/游戏总流量(M)',
    field: 'gameRateOfFlow',
    component: 'Input',
  },
  {
    label: '游戏质差次数',
    field: 'gameZccs',
    component: 'Input',
  },
  {
    label: '游戏质差时长占比(%)',
    field: 'gameProportion',
    component: 'Input',
  },
  {
    label: '游戏上行平均时延(ms)',
    field: 'gameUpDefer',
    component: 'Input',
  },
  {
    label: '游戏下行平均时延(ms)',
    field: 'gameDownDefer',
    component: 'Input',
  },
  {
    label: '游戏上行平均抖动(ms)',
    field: 'gameUpShake',
    component: 'Input',
  },
  {
    label: '游戏下行平均抖动(ms)',
    field: 'gameDownShake',
    component: 'Input',
  },
  {
    label: '主播网站名称',
    field: 'anchorName',
    component: 'Input',
  },
  {
    label: '主播下行累计流量(M)',
    field: 'anchorDown',
    component: 'Input',
  },
  {
    label: '主播上行累计流量(M)',
    field: 'anchorUp',
    component: 'Input',
  },
  {
    label: '日均时长/主播总时长(h)',
    field: 'anchorDaot',
    component: 'Input',
  },
  {
    label: '日均流量/主播总流量(M)',
    field: 'anchorRateOfFlow',
    component: 'Input',
  },
  {
    label: '主播质差次数',
    field: 'anchorZccs',
    component: 'Input',
  },
  {
    label: '主播质差时长占比(%)',
    field: 'anchorProportion',
    component: 'Input',
  },
  {
    label: '主播上行平均时延(ms)',
    field: 'anchorUpDefer',
    component: 'Input',
  },
  {
    label: '主播下行平均时延(ms)',
    field: 'anchorDownDefer',
    component: 'Input',
  },
  {
    label: '主播上行平均抖动(ms)',
    field: 'anchorUpShake',
    component: 'Input',
  },
  {
    label: '主播下行平均抖动(ms)',
    field: 'anchorDownShake',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];
